import 'package:flutter/material.dart';

class CustomAppBar extends AppBar {
  CustomAppBar(
    Widget title, {
    Key key,
    Widget leading,
    List<Widget> actions,
    Widget flexibleSpace,
    PreferredSizeWidget bottom,
    Color shadowColor,
    ShapeBorder shape,
    Color backgroundColor = Colors.white,
    Brightness brightness,
    IconThemeData iconTheme,
    IconThemeData actionsIconTheme,
    TextTheme textTheme = const TextTheme(
      headline6: TextStyle(
        fontSize: 16,
        color: Colors.black,
        fontWeight: FontWeight.w500,
      ),
    ),
    double toolbarHeight,
    double leadingWidth,
    bool primary = true,
    bool excludeHeaderSemantics = false,
  }) : super(
          key: key,
          leading: leading,
          automaticallyImplyLeading: true,
          title: title,
          actions: actions,
          flexibleSpace: flexibleSpace,
          bottom: bottom,
          elevation: 0,
          shadowColor: shadowColor,
          shape: shape,
          backgroundColor: backgroundColor,
          brightness: brightness,
          iconTheme: iconTheme,
          actionsIconTheme: actionsIconTheme,
          textTheme: textTheme,
          primary: primary,
          centerTitle: true,
          excludeHeaderSemantics: excludeHeaderSemantics,
          titleSpacing: NavigationToolbar.kMiddleSpacing,
          toolbarOpacity: 1.0,
          bottomOpacity: 1.0,
        );
}
